package com.jhhc.RHDB.Data.ServiceImpl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jhhc.RHDB.Data.Pojo.ST_RSVR_R;
import com.jhhc.RHDB.Data.Service.ST_RSVR_RService;
import com.jhhc.RHDB.Data.Dao.ST_RSVR_RMapper;


@Service
@Transactional
public class ST_RSVR_RServiceImpl implements ST_RSVR_RService {
    @Autowired
    private ST_RSVR_RMapper ST_RSVR_RMapper;


    @Override
    public int DeleteData(String Stations, String startTime, String endTime) {
        // TODO Auto-generated method stub
        return ST_RSVR_RMapper.DeleteData(Stations, startTime, endTime);
    }

    @Override
    public List<ST_RSVR_R> selectByStationArry(String Stations, String startTime, String endTime) {
        // TODO Auto-generated method stub
        return ST_RSVR_RMapper.selectByStationArry(Stations, startTime, endTime);
    }


    public String ArryToString(List<String> Stations) {
        // TODO Auto-generated method stub
        String stcdArr = "";
        for (int i = 0; i < Stations.size(); i++) {
            if (!stcdArr.trim().isEmpty() || !stcdArr.trim().equals("")) {
                stcdArr = Stations.get(i) + "," + stcdArr;
            } else {
                stcdArr = Stations.get(i);
            }

        }
        System.out.println("这是stcdarr" + stcdArr);
        return stcdArr;
    }

    @Override
    public ST_RSVR_R selectStartDate(String stcd) {
        return ST_RSVR_RMapper.selectStartDate(stcd);
    }

    @Override
    public ST_RSVR_R selectEndDate(String stcd) {
        return ST_RSVR_RMapper.selectEndDate(stcd);
    }

    @Override
    public List<ST_RSVR_R> selecStationDailyWaterLevel(String stcd, String startTime, String endTime) {
        return ST_RSVR_RMapper.selecStationDailyWaterLevel(stcd,startTime,endTime);
    }

    @Override
    public List<ST_RSVR_R> selecStationMonthWaterLevel(String stcd, String startTime, String endTime) {
        return ST_RSVR_RMapper.selecStationMonthWaterLevel(stcd,startTime,endTime);
    }

    @Override
    public Integer update(String stcd, String time) {
        // TODO Auto-generated method stub
        return null;
    }


    @Override
    public int InsertData(ST_RSVR_R t) {
        // TODO Auto-generated method stub
        return ST_RSVR_RMapper.InsertData(t);
    }


    @Override
    public List<ST_RSVR_R> selectRSVRNewEstData(List<String> StationId) {
        // TODO Auto-generated method stub
        return ST_RSVR_RMapper.selectRSVRNewEstData(StationId);
    }


    @Override
    public ST_RSVR_R selectByTmNewEstData(String stcd, String tm) {
        // TODO Auto-generated method stub
        return ST_RSVR_RMapper.selectByTmNewEstData(stcd, tm);
    }

    @Override
    public List<ST_RSVR_R> selectByStationArrys(List<String> stcd, String startTime, String endTime) {
        // TODO Auto-generated method stub
        return ST_RSVR_RMapper.selectByStationArrys(stcd, startTime, endTime);
    }
    @Override
    public List<ST_RSVR_R> selectBytime(String stcd, String startTime, String endTime) {
        return ST_RSVR_RMapper.selectBytime(stcd,startTime,endTime);
    }
}
